package com.his.controller;

import com.his.common.core.controller.BaseController;
import com.his.common.core.domain.AjaxResult;
import com.his.entity.dto.CheckRequest;
import com.his.entity.po.CheckRequestPO;
import com.his.service.ICheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/check")
public class CheckController extends BaseController {
    @Autowired
    private ICheckService checkService;

    @GetMapping("/list")
    public AjaxResult list() {
        return success(checkService.list());
    }

    @PostMapping("/submit")
    public AjaxResult submit(@RequestBody CheckRequestPO checkRequestPO) {
        checkService.submit(checkRequestPO);
        return success();
    }
}
